package qc.module.qms.api.consumer;

import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import qc.common.core.constants.QmsMQConstant;
import qc.module.qms.dto.mq.IotPacketsMessageDto;

/**
 * 原始报文解析Consumer，解析成功后修改原始报文记录的状态、发送至原始采集数据MQ
 *
 * @author QuCheng Tech
 * @since 2025/10/26
 */
@Component
@RocketMQMessageListener(
        topic = QmsMQConstant.MQ_RAWPACKETS_TOPIC,
        consumerGroup = QmsMQConstant.MQ_RAWPACKETS_CONSUMER_GROUP
)
public class IotPacketsParseConsumer implements RocketMQListener<IotPacketsMessageDto> {
    private static final Logger logger = LoggerFactory.getLogger(IotPacketsParseConsumer.class);

    @Override
    public void onMessage(IotPacketsMessageDto message) {
        logger.info("onMessage", message);
    }
}
